package com.tt.fashionWebSite.dao.jpa;

import com.tt.fashionWebSite.dao.BaiVietDao;
import com.tt.fashionWebSite.domain.BaiViet;
import com.tt.fashionWebSite.domain.DanhMucBaiViet;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository("baiViet")
public class BaiVietJpaDao extends GenericJpaDao<BaiViet, String> implements BaiVietDao {
    public BaiVietJpaDao () {
        super(BaiViet.class);
    }
    @Override
    public List<BaiViet> getAllPost(){
        return getEntityManager().createNamedQuery(BaiViet.GET_ALL_POST, BaiViet.class).getResultList();
    }
}
